package com.kun.mapper;

import com.kun.entity.Blogger;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author SunKun
 * @since 2021-06-14
 */
@Repository
public interface BloggerMapper extends BaseMapper<Blogger> {
    /**
     * 查询博主的用户名
     * @param username
     * @return
     * @throws Exception
     */
    @Select("SELECT * FROM blogger WHERE username = #{username}")
    Blogger queryBloggerByUsername(String username) throws RuntimeException;
}
